import React, { Component } from 'react'
import {NavLink,Route} from 'react-router-dom'
import Messges from './Messges'
import News from './News'

export default class Home extends Component {
    render() {
        return (
            <div>
                <div className="list-group">
                {/* Link写路由链接 */}
                    <NavLink activeClassName="hhh" className="list-group-item" to="/home/news">News</NavLink>
                    <NavLink activeClassName="hhh" className="list-group-item" to="/home/messges">Messges</NavLink>
                </div>
                <div className="panel-body">
                {/* Route注册路由 */}
                  <Route path="/home/news" component={News}/>
                  <Route path="/home/messges" component={Messges}/>
              </div>
            </div>
        )
    }
}
